﻿@{
    ViewBag.Title = "ToggleClass";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<style type="text/css">
	ul { width:150px; }
	.highlight { border: 3px dotted red; background-color: yellow; color: #008000; }
</style>

<h2>Toggle Class</h2>

<strong>Departments:</strong>
<ul class="highlight">
	<li>Marketing</li>
	<li>Sales</li>
	<li>Technology</li>
	<li>Customer Support</li>
</ul>

<input id="btnTestIt" type="button" value="Test It">

<script type="text/javascript">
    $(document).ready(function () {
        $("#btnTestIt").click(function () {
            $("ul").toggleClass("highlight");
        });
    });
</script>
